import pandas as pd

lid = 'portuguese'

# 读取polish数据文件
with open('data.list_'+lid, 'r') as file:
    polish_data = file.readlines()

# 获取polish数据的行数
original_length = len(polish_data)

# 计算需要重复的次数
repeat_times = 20

# 重复数据
extended_polish_data = polish_data * repeat_times

# 将结果写入新文件
with open('data.list_'+lid+'_extended', 'w') as file:
    file.writelines(extended_polish_data)

print(f"Original length: {original_length}")
print(f"Extended length: {len(extended_polish_data)}")
